package my.bean;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateBean {
	private String dateTime;
	private String week;
	private Calendar calendar = Calendar.getInstance();

	public String getDateTime() {
		Date currDate = Calendar.getInstance().getTime();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		dateTime = sdf.format(currDate);
		return dateTime;
	}

	public String getWeek() {
		String[] weeks = { "日", "一", "二", "三", "四", "五", "六" };
		int index = calendar.get(Calendar.DAY_OF_WEEK);
		week = "星期" + weeks[index - 1];
		return week;
	}
}
